# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Baptiste Grenier <baptiste@bapt.name>

pkgname=rubber
pkgver=1.6.0
pkgrel=3
pkgdesc="A wrapper for LaTeX and friends"
arch=('any')
url="https://launchpad.net/rubber/"
license=('GPL')
depends=('python')
makedepends=('texinfo' 'texlive-plainextra')
source=("https://gitlab.com/latex-rubber/rubber/-/archive/$pkgver/rubber-$pkgver.tar.gz")
sha512sums=('732894ba25d453567a9ff8189bc31fe6788cd85ba6b638f8d912686c431d6621e08fc11015459525dce8a4fb36d4351e438c9227ff4595c00bb8f52de9769abe')

build() {
  cd "${srcdir}/rubber-$pkgver"
  python setup.py build
}

package() {
  cd "${srcdir}/rubber-$pkgver"
  python setup.py install --root="$pkgdir" --mandir=/usr/share/man --infodir=/usr/share/info

  mkdir -p "$pkgdir"/usr/share/bash-completion/completions/
  echo "complete -f -X '!*.tex' rubber" >"$pkgdir"/usr/share/bash-completion/completions/rubber
}
